import React, { Component } from 'react';

import Search from './components/Search';

import List from './components/List';

export default class App extends Component {
    state = {
        items: []
    }
    render() {
        return (
            <div className="container">
                <Search getUservalue={this.getUservalue} />
                <List userInfo={this.state.items} />
            </div>
        )
    }


    getUservalue = (items) => {
        //把Search组件发送的用户信息放在自己的state中
        this.setState({ items });
    }
}
